<template>
  <view>
    <view class="company-header">
      <image :src="company.logo" class="company-logo" />
      <view class="company-name">{{company.name}}</view>
      <view class="company-desc">{{company.desc}}</view>
    </view>
    <view class="section-title">企业环境</view>
    <scroll-view scroll-x class="env-scroll">
      <image v-for="(img, idx) in company.env" :key="idx" :src="img" class="env-img" />
    </scroll-view>
    <view class="section-title">在招职位</view>
    <view class="job-list">
      <view class="job-card" v-for="(job, idx) in company.jobs" :key="idx">
        <view class="job-title">{{job.title}}</view>
        <view class="job-salary">{{job.salary}}</view>
        <view class="job-desc">{{job.desc}}</view>
      </view>
    </view>
  </view>
</template>
<script>
export default {
  data() {
    return {
      company: {
        name: '文化传媒',
        logo: '/static/company1.png',
        desc: '广告/传媒/设计',
        env: ['/static/env1.jpg', '/static/env2.jpg'],
        jobs: [
          { title: '平面设计', salary: '4-6K', desc: '有经验优先' },
          { title: '文案策划', salary: '3-5K', desc: '创意能力强' }
        ]
      }
    }
  },
  onLoad(options) {
    // 可根据 options.name 拉取企业详情
  }
}
</script>
<style>
.company-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32rpx 0 12rpx 0;
}
.company-logo {
  width: 120rpx;
  height: 120rpx;
  border-radius: 50%;
  margin-bottom: 10rpx;
}
.company-name {
  font-size: 32rpx;
  font-weight: bold;
  margin-bottom: 4rpx;
}
.company-desc {
  font-size: 24rpx;
  color: #888;
}
.section-title {
  margin: 32rpx 20rpx 12rpx 20rpx;
  font-size: 30rpx;
  font-weight: bold;
  color: #333;
}
.env-scroll {
  white-space: nowrap;
  margin-bottom: 10rpx;
  padding-left: 20rpx;
}
.env-img {
  width: 180rpx;
  height: 120rpx;
  border-radius: 12rpx;
  margin-right: 16rpx;
}
.job-list {
  padding: 0 20rpx;
}
.job-card {
  background: #fff;
  border-radius: 12rpx;
  box-shadow: 0 2rpx 8rpx #f0f1f2;
  margin-bottom: 16rpx;
  padding: 20rpx;
}
.job-title {
  font-size: 28rpx;
  font-weight: bold;
  margin-bottom: 4rpx;
}
.job-salary {
  font-size: 24rpx;
  color: #2d8cf0;
  margin-bottom: 4rpx;
}
.job-desc {
  font-size: 22rpx;
  color: #888;
}
</style> 